﻿<controls:ChildWindow x:Class="BioPatMLEditor.PatternControls.PatternAttrEditor.AttributeEditor" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
           xmlns:dataFormToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
           Width="400" Height="450" 
           Title="Pattern editor panel">

    <Grid x:Name="LayoutRoot" Margin="2" Background="Black">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <controls:TabControl x:Name="tabControl" Background="Black" Margin="0,0,-62,29" RenderTransformOrigin="0.5,0.5" Grid.RowSpan="2">

            <controls:TabItem x:Name="MainView" Header="Pattern Details">
                <dataFormToolkit:DataForm x:Name="PnlPatternSetter" HorizontalContentAlignment="Left"
        	        Foreground="Black" CommitButtonContent="Save" CancelButtonContent="Back" AutoCommit="False" AutoGenerateFields="True" Margin="0,0,60,0" Background="#FFE5E5E5" FontSize="10.667" FontWeight="Bold" />
            </controls:TabItem>
            <controls:TabItem x:Name="SubElementView" Header="" >
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"></ColumnDefinition>
                        <ColumnDefinition Width="auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="auto"></RowDefinition>
                        <RowDefinition Height="auto" />
                    </Grid.RowDefinitions>

                    <data:DataGrid x:Name="ElementGrid" Margin="10" ItemsSource="{Binding}" Height="130" Width="350">
                    </data:DataGrid>
                    <dataFormToolkit:DataForm x:Name="SubPanelDF"  Grid.Row="1" Margin="10" Height="180" ItemsSource="{Binding}" Width="350">
                    </dataFormToolkit:DataForm>


                </Grid>


            </controls:TabItem>
        </controls:TabControl>

        <Button Content="Done Edit" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="2" />



    </Grid>
</controls:ChildWindow>